# -*- coding: utf-8 -*-

# python 函数列表

def remove_space(str):
    """
        remove space
    :param str:
    :return:
    """
    str_no_space = str.replace(' ', '')
    return str_no_space

def remove_dollar(str):
    """
        remove  $
    :param str:
    :return:
    """
    str_no_dollar = str.replace('$', '')
    return str_no_dollar

def clean_str_lst(str_lit, operations):
    result = []
    for item in str_lit:
        for op in operations:
            item = op(item)
        result.append(item)
    return result

if __name__ == '__main__':
    str_list = [' $1.111','$2.222 ','$3.333','$4.dfd df']
    print str_list
    func_list =[remove_space, remove_dollar]
    lst = clean_str_lst(str_list, func_list)
    print lst